<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let xhr = new XMLHttpRequest();
      let url = "http://newshopapi.0melon0.cn/api/f_user/register";
      let data = "name=ldj&phone=18529382970&card=440184200003280919";
      xhr.open("POST", url);

      xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xhr.send(data);
      xhr.addEventListener("readystatechange", function () {
        if (xhr.readyState == 4) {
          if (xhr.status == 200) {
            let data = JSON.parse(xhr.responseText);
            console.log(data);
          }
        }
      });
    </script>
  </body>
</html>
